package com.fable.sp.core.domain;

import org.springframework.util.StringUtils;

import java.io.Serializable;

/**
 * .
 *
 * @author stormning on 16/8/29.
 */
public class ContainerQuery implements Serializable {

    private String name;

    private Long beginAt;

    private Long endAt;

    private boolean excludeDeleted = true;

    public String getName() {
        if (StringUtils.hasText(name)) {
            return "%" + name.toLowerCase() + "%";
        }
        return null;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getBeginAt() {
        return beginAt;
    }

    public void setBeginAt(Long beginAt) {
        this.beginAt = beginAt;
    }

    public Long getEndAt() {
        return endAt;
    }

    public void setEndAt(Long endAt) {
        this.endAt = endAt;
    }

    public boolean isExcludeDeleted() {
        return excludeDeleted;
    }

    public void setExcludeDeleted(boolean excludeDeleted) {
        this.excludeDeleted = excludeDeleted;
    }
}
